-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Heartbeat] Dedupe screenshots / Extra Args #25808
Conversation
Pinging @elastic/uptime (Team:Uptime) |
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪💚 Flaky test reportTests succeeded. Expand to view the summary
Test stats 🧪
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, tested and it works as expected.
We might need to change one more thing to get it merged. adding step/block
to the screenshot datastream index.
PR now adds mapping and properly routes to correct dataset. Still needs tests |
This pull request is now in conflicts. Could you fix it? 🙏
|
- name: blocks | ||
type: group | ||
fields: | ||
- name: hash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to add top
and left
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see the top
& left
yet in the new changes.
fields: | ||
- name: width | ||
type: integer | ||
description: Width of the full screenshot in pixels. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we remove the use of full here? Full seems like full page screenshot but we are capture only the viewport width and height.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm, I intended it to mean not of an individual block. I'll clarify that.
@@ -108,23 +109,31 @@ func runCmd( | |||
return nil, err | |||
} | |||
|
|||
// Default capabilities | |||
capabilities = append(capabilities, "trace", "metrics", "filmstrips", "ssblocks") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if its the right way to do it.
I was thinking we should make it configurable by introducing Capability flag in the config.go
in addition to params and then using it here for experimentation.
moving forward once the feature is built in to the UI, we can add it to --rich-events
in synthetics.
WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see what you mean. That makes sense, will make those changes!
This pull request is now in conflicts. Could you fix it? 🙏
|
// or more contributor license agreements. Licensed under the Elastic License; | ||
// you may not use this file except in compliance with the Elastic License. | ||
|
||
package browser |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file isn't new, it's just moved. Enough of it changed due to renaming the ss
var to s
that git thinks it's all new.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM after the top
and left
changes.
- name: blocks | ||
type: group | ||
fields: | ||
- name: hash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see the top
& left
yet in the new changes.
}, | ||
{ | ||
"kitchen sink", | ||
&Config{SyntheticsArgs: []string{"--capability", "trace"}, Sandbox: true}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am curios to see a test with capability > 2 and other flags as part of synthetic args. Reason being variadic args are prone to errors.
Co-authored-by: Vignesh Shanmugam <vignesh.shanmugam22@gmail.com>
@vigneshshanmugam I believe I've addressed your concerns. I left out |
@andrewvc Spot on, Sounds good to me ++. |
@Mergifyio backport 7.x |
(cherry picked from commit db6738e) # Conflicts: # heartbeat/_meta/fields.common.yml # heartbeat/docs/fields.asciidoc # heartbeat/include/fields.go # x-pack/heartbeat/include/fields.go
Command
|
Command
|
* [Heartbeat] Dedupe screenshots / Extra Args (#25808) (cherry picked from commit db6738e) # Conflicts: # heartbeat/_meta/fields.common.yml # heartbeat/docs/fields.asciidoc # heartbeat/include/fields.go # x-pack/heartbeat/include/fields.go * Fix merge * Update fields docs Co-authored-by: Andrew Cholakian <andrew@andrewvc.com>
Counterpart of elastic/synthetics#282
Fixes: #26188
Adds support for screenshot blocks as mentioned in the synthetics PR, and also switches over to using the new flags / capabilities system. This is done by using
--rich-events
by default as a synthetics flag, and also exposing a newsynthetics_args
option for synthetics, allowing users to use configs like:This PR also moves some of the logic from
browser.go
tosuite.go
, which was also renamed to be cleaner and more in keeping with idiomatic go. This also made adding a small test possible. We still need a better story around E2E testing, but for now this will suffice.Finally, this adds mappings for
screenshot_ref
objects as well as blocks, and routes them to the correct dataset. It also improves tests for enrichment of events to help test this.